<?php

namespace app\wechat\validate;

use think\Validate as thinkValidate;

class WechatValidate extends thinkValidate {

    protected $rule = [
        "token" => 'require',
        "money" => "require|float",
        "avatarUrl" => "require",
        "gender" => "require",
        "customerId" => "require",
        "likeReceiveId" => "require",
        "pageNum" => "require",
        "pageSize" => "require",
        "wechatCode" => "require",
        "encryptedData" => "require",
        "iv" => "require",
        "sign" => "require",
        "timeSortType" => "require",
        "nearbySortType" => "require",
        "latitude" => "require",
        "longitude" => "require",
        "littleDesc" => "require",
        "isTop" => "require",
        "catId" => "require",
        "homeJson" => "require",
        "sceneId" => "require",
        "goodsId" => "require",
        "backgroundImage" => "require",
        "formId" => "require",
        "message" => "require",
        "messageId" => "require",
        "goodsName" => "require",
        "isSale" => "require",
        "startDate" => "require",
        "endDate" => "require",
        "wechatNumber" => "require",
        "bindPhone" => "require",
    ];

    protected $message = [
        'wechatNumber' => '微信号不能为空',
        'bindPhone' => '绑定手机号不能为空',
    ];

    protected $scene = [
        "storeCenter" => ['token', 'latitude', 'longitude'],
        "withdrawCash" => ['token', 'money'],
        "login" => ['wechatCode', 'encryptedData', 'iv'],
        "like" => ['token', 'customerId'],
        "receivePoint" => ['token', 'likeReceiveId'],
        "consumeRankingList" => ['token', 'pageNum', "pageSize"],
        "otherConsumeRankingList" => ['token', 'pageNum', "pageSize", "customerId"],
        "pointRankingList" => ['token', 'pageNum', 'pageSize'],
        "otherPointRankingList" => ['token', 'pageNum', 'pageSize', "customerId"],
        "myCenter" => ['token'],
        "topGoods" => ['token', 'goodsId', 'isTop'],
        "saleGoods" => ['token', 'goodsId', "isSale"],
        "goodsList" => ['token', "pageNum", "pageSize"],
        "arrangeGoods" => ['token', "catId"],
        "goodsCatList" => ['token'],
        "updateSign" => ['token', 'sign'],
        "footprintList" => ['token', 'timeSortType', 'pageNum', 'pageSize'],
        "popularityList" => ['token', 'pointSortType', 'pageNum', 'pageSize'],
        "otherStoreCenter" => ['token', 'customerId'],
        "nearbyList" => ['token', 'nearbySortType', 'pageNum', "pageSize",
            "latitude", "longitude"],
        "unlockGoods" => ["token", "goodsId"],
        "myOrderList" => ["token", "pageNum", "pageSize"],
        "accountDetailList" => ["token", "pageNum", "pageSize"],
        "incomeAccountDetailList" => ["token", "pageNum", "pageSize"],
        "pointAccountDetailList" => ["token", "pageNum", "pageSize"],
        "otherGoodsList" => ["token", "customerId", "pageNum", "pageSize"],
        "updateHomeJson" => ['token', 'homeJson'],
        "uploadImage" => ["token"],
        "sceneList" => ["token"],
        "openShop" => ['token', "sceneId"],
        "updateGoodsLittleDesc" => ["token", "goodsId", "littleDesc"],
        "shareGoodsPage" => ["token", "goodsId", "customerId"],
        "shareOtherStorePage" => ["token", "customerId"],
        "otherMyCenter" => ["token", "customerId"],
        "receiveOtherPoint" => ["token", "customerId"],
        "getOssToken" => ['token'],
        "recommendCenter" => ["token"],
        "updateHomeJsonForOss" => ["token", "homeJson", "backgroundImage"],
        "openMemberPage" => ["token", "customerId"],
        "pushNewFormId" => ["token", "formId"],
        "homeCenter" => ["token"],
        "myMessageList" => ["token"],
        "submitWriteMessage" => ["token", "customerId", "message"],
        "deleteMessage" => ["token", "messageId"],
        "deleteMyMessage" => ["token", "messageId"],
        "myShelf" => ["token"],
        "home" => ["token", "latitude", "longitude"],
        "searchMyShelfByCatId" => ["token", "catId"],
        "searchMyShelfByGoodsName" => ["token", "goodsName"],
        "otherMessageList" => ["token", "customerId"],
        "orderList" => ["token", "pageNum", "pageSize"],
        'otherShelf' => ["token", "customerId"],
        "searchOtherShelfByCatId" => ["token", "catId", "customerId"],
        "searchOtherShelfByGoodsName" => ["token", "goodsName", "customerId", "pageNum", "pageSize"],
        "getMiniProgramOssToken" => ["token"],
        "submitCustomerFeedback" => ["token", "message", "bindPhone", "wechatNumber"],
        "submitGoodsFeedback" => ["token", "message", "bindPhone", "wechatNumber"],
        "wechatAuthorizeDecryption" => ["token", "wechatCode", "encryptedData", "iv"],
        "dataCenter" => ["token", "startDate", "endDate"],
    ];
}